package com.vanke.kotlin_mvp.data

/**
 * @name Kotlin_MVP
 * @package name：com.vanke.kotlin_mvp.data
 * @class describe
 * @anthor shiyuchuan
 * @time 2017/8/17 9:38
 */
interface TaskDataSource {

    interface LoadTaskCallback {
        fun onTaskLoaded(tasks: List<Task>)

        fun onDataNotAvailable()
    }

    interface GetTaskCallback {
        fun onTaskLoaded(task: Task)

        fun onDataAvailable()
    }

    fun getTasks(callback: LoadTaskCallback)

    fun getTask(taskId: String, callback: GetTaskCallback)

    fun saveTask(task: Task)

    fun completeTask(task: Task)

    fun completeTask(taskId: String)

    fun activateTask(task: Task)

    fun activateTask(taskId: String)

    fun clearCompletedTasks()

    fun refreshTasks()

    fun deleteAllTasks()

    fun deleteTask(taskId: String)
}